package org.batch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.custom.spring.boot.entity.batch.AccountInfo;

import java.math.BigDecimal;

/**
 * account表操作接口
 *
 * @author LiKun
 * @date 2021/9/28 11:05
 */
public interface AccountInfoMapper extends BaseMapper<AccountInfo> {
    /**
     * 更新账户余额
     *
     * @param id      账户ID
     * @param amount  交易金额
     * @param version 版本号
     */
    void updateBalance(@Param("id") String id, @Param("amount") BigDecimal amount, @Param("version") int version);
}
